<template>
  <div>
    <h1>我是子组件</h1>
    {{ send }}
  </div>
</template>

<script setup>
    import { ref, reactive, toRefs, onBeforeMount, onMounted, watchEffect, computed } from 'vue';
    //接收父组件传递的数据
    let props = defineProps({
        send : {
            default : "",
            type : String,
        },
    })
    //子传父
    let emit = defineEmits(['child'])
    onMounted(()=>{
        emit('child','我是子组件传的数据')
    })
</script>
<style scoped>
    
</style>